<?php
/**
 * Created by PhpStorm.
 * User: zc
 * Date: 2019/8/5
 * Time: 23:36
 */
namespace app\api\controller\v1;

use app\common\controller\Api;
use app\common\logic\SuggestLogic;

class Suggest extends Api
{
    protected $noNeedLogin = [];  //不能登陆方法
    protected $noNeedRight = '*';
    /**
     * 关于我们接口
     */
    public function suggest()
    {
        $content= $this->request->post('content')?:'';
        if(empty($content)){
            $this->error('请输入反馈信息！');
        }
        $model = new SuggestLogic();
        $data = $model->setUserId(UID)->setContent($content)->setOrgCateId(ORG_CATE_ID)->saveSuggest();
        if($data){
            $this->success('反馈成功！');
        }else{
            $this->error('反馈失败！');
        }
    }
}